It is well known that the thermal efficiency of an internal combustion engine is very low. The energy that is not extracted as usable mechanical energy is typically expelled as waste heat into the atmosphere.
The greatest amount of waste heat is typically expelled through the engine's hot exhaust gas and the engine's coolant system.